package com.ddstation.onsitelaw.mapper;


import com.ddstation.onsitelaw.entity.auditentity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ClinicAuditMapper {
    List<DtInvsViolationManageEntity> selectList(
            @Param("institutionId") String institutionId
            , @Param("medicalId") Integer medicalId
            , @Param("prescriptionId") Integer prescriptionId);

    int insertMedicalViolation(List<DtInvsViolationManageEntity> violations);

    int insertPrescriptionViolation(List<DtInvsViolationManageEntity> violations);

    List<Integer> selectTargetIds(DtInvsViolationManageEntity w);

    int updateQueueStatus(
            @Param("institutionId") String institutionId
            , @Param("businessSubType") Integer businessSubType
            , @Param("messageType") Integer messageType
            , @Param("targetIds") List<Integer> targetIds);

    int insertMessageQueue(List<DtInvsMessageQueueEntity> queues);

    int updateCheckDailyStatus(
            @Param("institutionId") String institutionId
            , @Param("businessType") Integer businessType
            , @Param("businessSubType") Integer businessSubType
            , @Param("targetIds") List<Integer> targetIds);

    int insertCheckDaily(List<DtInvsIllegalCheckDailyEntity> daily);

    List<Integer> selectIllegalIds(
            @Param("institutionId") String institutionId
            , @Param("businessType") Integer businessType
            , @Param("businessSubType") Integer businessSubType
            , @Param("targetIds") List<Integer> targetIds);

    int updateIllegalAppealStatus(
            @Param("illegalIds") List<Integer> illegalIds);

    int insertIllegalAppeal(List<DtInvsIllegalAppealEntity> appeals);

    int updateStatus(DtInvsViolationManageEntity w);

    List<MaInvsIcd10SectionEntity> selectTechnicalsByIcd10(Map<String, Object> icd10s);

    List<MaInvsIcd10SpecialtyEntity> selectAllSpecialtys();

    String selectMsg(String msgId);

    List<Map<String, Object>> selectSameDoctorMedical(
            @Param("institutionId") String institutionId
            , @Param("idCard") String idCard
            , @Param("val") Integer val);


    List<MaInvsIcd10SectionEntity> selectByIcd10AndScope(
            @Param("technicalOffices") String technicalOffices
            , @Param("icd10") String icd10);
}
